English
Forum

OOP - New object create

 

Jörg
Sellmeyer
Hi,
i don't know, whether something like really none vorgesehen is, but I finds strange.

If I one New object create wants must I the area with Dispose unlock and new deklarieren and then GEHTS again.
If I the but with a aray try GEHTS only twice and then is Schluß.

Perhaps white Yes someone council:
CompileMarkSeparation!

on this example sees one again, that it really mögliich his ought to whom equal Bezeichner as often as you like To use:
CompileMarkSeparation
Declare appexit%,TB#
 $H WINDOWS.PH
 $H commctrl.ph
 $I RGHTOOLBAR.INC
Def GetSysColor(1) !"USER32","GetSysColor"
Def TBClicked(1) Abs(%menuitem) = &(1)
User Messages 16

Proc MyToolBar

    TB# = New(RGHToolbar,%HWnd,0,2,0,2000,0)
    TB#.AddButton(0,2000,"Button 1")
    TB#.Separator()
    TB#.AddButton(10,2001,"Button 2")
    TB#.AddButton(10,2002,time$(0) + ":" + time$(1))
    TB#.Separator()
    TB#.AddButton(3,2003,"Button 4")
    TB#.AddButton(4,2004,"Button 5")
    TB#.CheckButton(2004,1)
    TB#.HideButton(2004)
    TB#.Separator()
    TB#.AddButton(3,2005,"Ende")

ENDPROC

Window Title "Test"
Window Style $023A
SetTrueColor 1
Window 100,100-270,64
Cls GetSysColor(15)
UseFont "MS Sans Serif",13,0,0,0,0
SetDialogFont 1
MyToolBar

WhileNot appexit%

    WaitInput
    Case Or(%umessage = 16,appexit% > 0):Break

    If TBClicked(2005)

        appexit% = 1

    ElseIf TBClicked(2000)

        DestroyWindow( TB#.GetHandle())
        Window Title time$(0) + ":" + time$(1)
        Dispose TB#
        Declare TB#
        MyToolBar

    ElseIf TBClicked(2001)

        Window Title "Button 2 gedrückt"

    ElseIf TBClicked(2002)

        Window Title "Button 3 gedrückt"

    ElseIf TBClicked(2003)

        TB#.HideButton(2003)
        TB#.ShowButton(2004)

    ElseIf TBClicked(2004)

        Engage% = 0
        TB#.HideButton(2004)
        TB#.ShowButton(2003)

    EndIf

Wend

 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
08/28/06  
 



without plenty To testing, but You spring with Goto a Procedure, the power whom Stack broken and can't gutgehen.

PS: Sprungmarken with Umlauten
 
08/28/06  
 



Goto a Proc out?
 
08/28/06  
 




Jörg
Sellmeyer
Related to the Goto was only one Test, to see whether therefore The Variable anew global declared becomes. becomes tappt im dunkeln well not.
I werd me well altogether a others Lösungsansatz conceive must.
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
08/28/06  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

780 Views

Untitledvor 0 min.

Themeninformationen

this Topic has 3 subscriber:

Jörg Sellmeyer (2x)
iF (1x)
unbekannt (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie