Wanted: Xtreams-Grid

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Wanted: Xtreams-Grid

Holger Kleinsorgen-4
WANTED for xtream coolness and usefulness: Xtreams-Grid

The delinquent has last been seen on the 11th of July, when he disclosed
his shocking crimes. He left his home and went into hiding shortly after.

Every hint is appreciated. Please call 1-800-GRID or report here.
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

[7.8] Opening dialog from forked process

Carl Gundel
Liberty BASIC runs each instance of a BASIC program in its own process.  I have no trouble opening and using normal window from a BASIC program's own process, but when I try to change it to a dialog, the window becomes unresponsive.

Here is a snippet of code which shows what happens with a regular window (it works okay).  Change the #normal in the last line to #dialog, and then it doesn't work.

| builder windowSpec firstModel secondModel answerModel |
builder := UIBuilder new.
builder window: ApplicationWindow new.
firstModel := '3' asValue.
secondModel := '4' asValue.
answerModel := '' asValue.
windowSpec := WindowSpec label: 'my window'.
builder add: windowSpec.
builder add: ((InputFieldSpec model: firstModel layout: (10@10 extent: 50@25)) name: 'first').
builder add: (InputFieldSpec model: secondModel layout: (70@10 extent: 50@25)).
builder add: ((ActionButtonSpec model:
        [
                answerModel
                        value: (firstModel value asNumber + secondModel value asNumber) printString
        ] layout: (130@10 extent: 30@25)) label: 'Add'; yourself).
builder add: (InputFieldSpec model: answerModel layout: (170@10 extent: 50@25)).
"change #normal to #dialog"
[ builder openWithExtent: 300@120 andType: #normal ] fork

Any ideas?  Thanks.

-Carl Gundel
http://www.libertybasic.com
http://www.runbasic.com
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [7.8] Opening dialog from forked process

Carl Gundel
Okay, I dug around and discovered the DeferrableAction class, which allows me to connect the opening of my dialog with the UI thread of the current window.  That seems to do the trick:

  (DeferrableAction new block: [ open my dialog ]) activate

I hope that's helpful to others.  :-)

-Carl

On Aug 20, 2011, at 3:42 PM, Carl Gundel wrote:

> Liberty BASIC runs each instance of a BASIC program in its own process.  I have no trouble opening and using normal window from a BASIC program's own process, but when I try to change it to a dialog, the window becomes unresponsive.
>
> Here is a snippet of code which shows what happens with a regular window (it works okay).  Change the #normal in the last line to #dialog, and then it doesn't work.
>
> | builder windowSpec firstModel secondModel answerModel |
> builder := UIBuilder new.
> builder window: ApplicationWindow new.
> firstModel := '3' asValue.
> secondModel := '4' asValue.
> answerModel := '' asValue.
> windowSpec := WindowSpec label: 'my window'.
> builder add: windowSpec.
> builder add: ((InputFieldSpec model: firstModel layout: (10@10 extent: 50@25)) name: 'first').
> builder add: (InputFieldSpec model: secondModel layout: (70@10 extent: 50@25)).
> builder add: ((ActionButtonSpec model:
> [
> answerModel
> value: (firstModel value asNumber + secondModel value asNumber) printString
> ] layout: (130@10 extent: 30@25)) label: 'Add'; yourself).
> builder add: (InputFieldSpec model: answerModel layout: (170@10 extent: 50@25)).
> "change #normal to #dialog"
> [ builder openWithExtent: 300@120 andType: #normal ] fork
>
> Any ideas?  Thanks.
>
> -Carl Gundel
> http://www.libertybasic.com
> http://www.runbasic.com
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc