Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: MathLink and GUIKit

  • To: mathgroup at smc.vnet.net
  • Subject: [mg57345] Re: MathLink and GUIKit
  • From: David Bailey <dave at Remove_Thisdbailey.co.uk>
  • Date: Wed, 25 May 2005 06:02:52 -0400 (EDT)
  • References: <d6urtg$iv7$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Goyan wrote:
> Hi all,
> 
> I have a written C++ function called HSeg which I can call it after 
> using "Install[]" using Mathlink, however, when I dont seem to be able 
> to call the function within the GUIKit.  My code is as the following:
> 
> HSegButton = GUIRun[
>      Widget["Panel", {Widget["
> 	Button", {"text" -> "HSeg", BindEvent["mouseClicked",
> 		Script[HSeg[img]]]]}]}
>        ]
>      ]
> 
> Can anyone help me with this?
> 
> Thank you in advance.
> 
> Goyan
> 
Hi,

The problem here is that the GUIKit moves all the global symbols inside 
scripts into private contexts! You can get round this in three ways:

1) Use the IncludedScriptContexts option to GUIRun or GUIRunModal

2) Use symbols from some other context than Global`

3) Use my SuperWidgetPackage (downloadable from my site) that makes the 
GUIKit much more accessible.

Feel free to contact me if you would like to discuss this further.

David Bailey
http://www.dbaileyconsultancy.co.uk


  • Prev by Date: Re: Applying a list of functions to a list of arguments
  • Next by Date: Re: Sorting nested list
  • Previous by thread: Re: help with reading binary files using Utilities`BinaryFiles'
  • Next by thread: Trouble with an integral