ups? evaluate in Win32for turnkeyd prgms 
Author Message
 ups? evaluate in Win32for turnkeyd prgms

Hi to all,
I've  made a program running with Win32for that reads some lines from a
Data-file and interpret them via EVALUATE.
All runs well, but when I turnkeyed it the *.EXE chrashes. (see the fool-example
blow)
I found a turnaround (interpret the string by NUMBER?) but I'm also interested
in the diagnostics of that behavior.
Is someone willing to give me hint?

Fool-example follows (Windows 98) It's taken from the TEST.F of win32for. Lines
ending with \ *** are changed by me. Please use monospaced font.
\ test

Create test$ ," 1 2 3 4 5 6 "    \ ***

:Object Tabdlg <Super DialogWindow

      EditControl Edit_1
      EditControl Edit_2
      ButtonControl Button_1

:M WindowStyle: ( -- style )            \ return the window style
                WindowStyle: super
                ;M

    :M StartSize: 175 175 ;M
    :M StartPos:  100 100 ;M
    :M On_Init:
                On_Init: super
                Self Start: Edit_1
20 46   103 20        Move: Edit_1  \ x y w h
S" Q-one"          SetText: Edit_1

                Self Start: Edit_2
20 86   103 20        Move: Edit_2
S" Q_two"          SetText: Edit_2

 IDOK                SetID: Button_1
 self                Start: Button_1
20 126   103 20       Move: Button_1
s" Ok"             SetText: Button_1
BS_DEFPUSHBUTTON    +Style: Button_1

;M

:M WM_COMMAND   ( hwnd msg wparam lparam -- res )
        over LOWORD ( ID )
        case
                IDOK    of test$ count evaluate    \ ***
                        + + + + + 0 <# #s #>       \ ***
                        settext: Button_1          \ ***
                        endof

        endcase
        0 ;M

;Object

: test Start: Tabdlg ;       \ ***

' test turnkey testfenster   \ ***

--
1 - Planung hei?t, den Zufall durch Irrtum zu ersetzen. (Peter Ustinov)
2 - Planning is replacing chance with ignorance(error). (??) (Peter Ustinov)
Is the translation (2) right? Suggestions are welcome:-)



Wed, 22 May 2002 03:00:00 GMT  
 ups? evaluate in Win32for turnkeyd prgms

Quote:
> Hi to all,
> I've  made a program running with Win32for that reads some lines from a
> Data-file and interpret them via EVALUATE.
> All runs well, but when I turnkeyed it the *.EXE chrashes. (see the fool-example blow)
> I found a turnaround (interpret the string by NUMBER?) but I'm also interested
> in the diagnostics of that behavior.
> Is someone willing to give me hint?

Maybe, just maybe, the EVALUATE is taking a (relatively) large amount of time. In that
case the event handler is re-entered many times. It depends on the mechanism Win32for
services its event loop. NUMBER? wouldn't look for events.

Quote:
> 1 - Planung hei?t, den Zufall durch Irrtum zu ersetzen. (Peter Ustinov)
> 2 - Planning is replacing chance with ignorance(error). (??) (Peter Ustinov)
> Is the translation (2) right? Suggestions are welcome:-)

My suggestion (ignorance nor error feels right to me):

3 - Planning replaces chance with mistake. (Peter Ustinov)

-marcel



Thu, 23 May 2002 03:00:00 GMT  
 ups? evaluate in Win32for turnkeyd prgms
Tanks Marcel,
I'll take a look at it.

Marcel Hendrix schrieb:

snipp ....

Quote:

> Maybe, just maybe, the EVALUATE is taking a (relatively) large amount of time. In that
> case the event handler is re-entered many times. It depends on the mechanism Win32for
> services its event loop. NUMBER? wouldn't look for events.

--
1 - Planung hei?t, den Zufall durch Irrtum zu ersetzen. (Peter Ustinov)
2 - Planning is replacing chance with ignorance. (??) (Peter Ustinov)
3 - Planning replaces chance with mistake. (Peter Ustinov) (M.Hendrix)
Is the translation (2) right? Suggestions like 3 are welcome:-)


Thu, 23 May 2002 03:00:00 GMT  
 ups? evaluate in Win32for turnkeyd prgms

Quote:

>Hi to all,
>I've  made a program running with Win32for that reads some lines from a
>Data-file and interpret them via EVALUATE.
>All runs well, but when I turnkeyed it the *.EXE chrashes.

TURNKEY throws away the dictionary headers, causing EVALUATE to crash when
it tries to look in the dictionary. Try using FSAVE or APPLICATION instead.

Andrew



Thu, 23 May 2002 03:00:00 GMT  
 ups? evaluate in Win32for turnkeyd prgms

Quote:

> Tanks Marcel,
> I'll take a look at it.

> Marcel Hendrix schrieb:

> snipp ....

> > Maybe, just maybe, the EVALUATE is taking a (relatively) large amount of time. In that
> > case the event handler is re-entered many times. It depends on the mechanism Win32for
> > services its event loop. NUMBER? wouldn't look for events.

> --
> 1 - Planung hei?t, den Zufall durch Irrtum zu ersetzen. (Peter Ustinov)
> 2 - Planning is replacing chance with ignorance. (??) (Peter Ustinov)
> 3 - Planning replaces chance with mistake. (Peter Ustinov) (M.Hendrix)
> Is the translation (2) right? Suggestions like 3 are welcome:-)

My take on the German is "Planning means replacing chance with error."
In what language did Ustinov utter the original? That should be the
archetype.

Jerry
--
Engineering is the art of making what you want from things you can get.
-----------------------------------------------------------------------



Thu, 23 May 2002 03:00:00 GMT  
 ups? evaluate in Win32for turnkeyd prgms
snipp ....

Quote:

> > --
> > 1 - Planung hei?t, den Zufall durch Irrtum zu ersetzen. (Peter Ustinov)
> > 2 - Planning is replacing chance with ignorance. (??) (Peter Ustinov)
> > 3 - Planning replaces chance with mistake. (Peter Ustinov) (M.Hendrix)
> > Is the translation (2) right? Suggestions like 3 are welcome:-)

> My take on the German is "Planning means replacing chance with error."
> In what language did Ustinov utter the original? That should be the
> archetype.

> Jerry
> --
> Engineering is the art of making what you want from things you can get.
> -----------------------------------------------------------------------

I don't know: I read it in German so as you see above!

--
1 - Planung hei?t, den Zufall durch Irrtum zu ersetzen. (Peter Ustinov)
2 - Planning is replacing chance with ignorance. (??) (Peter Ustinov)
3 - Planning replaces chance with mistake. (Peter Ustinov) (m.Hendrix)
Is the translation (2) right? Suggestions like 3 are welcome:-)



Fri, 24 May 2002 03:00:00 GMT  
 ups? evaluate in Win32for turnkeyd prgms
Hi Andrew,
thanks.

snipp ...

Quote:

> TURNKEY throws away the dictionary headers, causing EVALUATE to crash when
> it tries to look in the dictionary. Try using FSAVE or APPLICATION instead.

> Andrew

I beleive it but : 4000 4000 ' test application testfenster doesn't work either.

I share the opinion that the problem referres to missing headers (at least it
accurs in FIND) as looking only for numbers I' found that workaround:

: t_INTERPRET1    ( -- )

                WHILE   SAVE-SRC number number, \ the find part is cut; numbers
only!
                ?UNSAVE-SRC
                REPEAT DROP ;

:M WM_COMMAND   ( hwnd msg wparam lparam -- res )
        over LOWORD ( ID )
        case
                IDOK    of   ['] t_interpret is interpret
                         test$  count evaluate
                         + + + + + 0 <# #s #>
                         settext: Button_1
                        ['] _interpret is interpret
                        endof

        endcase
        0 ;M
that fits my goal.

regards Martin

--
1 - Planung hei?t, den Zufall durch Irrtum zu ersetzen. (Peter Ustinov)
2 - Planning is replacing chance with ignorance. (??) (Peter Ustinov)
3 - Planning replaces chance with mistake. (Peter Ustinov) (m.Hendrix)
Is the translation (2) right? Suggestions like 3 are welcome:-)



Fri, 24 May 2002 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Evaluating with HOAS (sort-of-was: Shortest self-evaluating evaluator)

2. Modelling of Ada prgms

3. in iwidgets ,tabnotebook, will tcl evaluate the entire code when it runs or it will evaluate

4. Mouse over pop-ups with VisualWorks

5. UPS, RPS, Modules/Template Anyone?

6. Lock-ups on Network

7. interface with UPS/FedExp carrier?

8. Pop-ups in VW 2

9. no more hardware back ups

10. no more hardware back ups

11. Lock-ups in 4.0

12. Information lost when UPS failed

 

 
Powered by phpBB® Forum Software