[Wxsqueak] WxSqueak Constants

Rob Rothwell r.j.rothwell at gmail.com
Sat Jan 10 18:37:35 UTC 2009


Ok...I see what you have done...sort of...!

You are using "Presenters" and "PluggableWidgets" to do what I asked, I
think.

Take care,

Rob

On Sat, Jan 10, 2009 at 10:58 AM, Rob Rothwell <r.j.rothwell at gmail.com>wrote:

> On Sat, Jan 10, 2009 at 9:18 AM, Rob Gayvert <rtg at rochester.rr.com> wrote:
>
>> Rob Rothwell wrote:
>>
>> All of the wx classes inherit from WxBase, which has WxConstants as a pool
>> dictionary. There's a bit of magic here, in that WxConstants is actually
>> loaded at startup from the VM, so that it gets the correct values of these
>> constants for the current platform (e.g., some values are different for
>> Windows vs OS X).
>
>
> Ok...so if I want to add my own menu Id's, say, I would use the traditional
> method of, say, #fileDoSomethingNew...
>
> Always the magic...!
>
>
>
>>
>>> Also, I am just trying to learn how to get around in WxSqueak by creating
>>> a simple tabbed editor.  I can't figure out which event lets me know I have
>>> switched tabs (pages) so I can give the focus to the text editor without
>>> having to click in the edit window as well.  Any hints?  The wxWidgets
>>> documentation indicates a *EVT_NOTEBOOK_PAGE_CHANGED* message, so I was
>>> looking for something like wxEvtNotebookPageChanged, but it doesn't exist.
>>>  Just not implemented?
>>>
>>
>> Figuring out which events to use is one of the hardest parts of using
>> wxWidgets, especially if you're not using a GUI builder. In this case the
>> documentation references the *macro* EVT_NOTEBOOK_PAGE_CHANGED, but the
>> actual event is wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED (you have to keep in
>> mind that the manual is written for C++ programmers).
>>
>> Take a look at the controls sample, in particular
>> WxControlsSamplePanel>>setupEvents.
>
>
> Late last night (or early this morning), I did find the controls sample,
> and tried something like:
>
>     panel on: #wxEvtCommandNotebookPageChanged send: [:evt | tc setFocus.
> tc setInsertionPoint: 0. evt skip],  but still the notebook tab retains the
> focus.  You're right about searching for the proper events; it's VB6 all
> over again!
>
> Sometimes the most basic questions are the hardest, especially when they
>> reveal weaknesses in the framework ;)
>
>
> On the "VB6" note, how would you recommend wiring controls to your model?
> I was thinking about doing something like Aida does with the concept of
> WebElements.  You know, create something like a wxCheckBoxElement that does
> the event handling for you and wires the value of the check to your domain
> model, and then being able to build new elements containing other elements.
>
> Otherwise, it DOES feel very much like standard Windows event driven
> programming with your code spread out all over the place...
>
> However, since I have a background with windows controls, understanding the
> widgets is easier for me than Morphic widgets, or VW controls, so I think I
> could actually wrap my mind around wiring a real model to a view--I just
> thought I'd ask if you found something worked better in your experience!
>
> Thank you,
>
> Rob
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/wxsqueak/attachments/20090110/74f3c6fd/attachment.htm


More information about the Wxsqueak mailing list