Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TABLEUPDATE(.T.) bombs with uncommitted changes
Message
From
01/10/2003 18:47:09
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00833421
Message ID:
00834024
Views:
27
David,

Sorry, my mistake - what can I say :-)

Anyway, it works, just remember to set the ShowWindow property of the toolbar to 1, or you'll never see the damned thing, and maybe add a
This.Dock(0,0,0) to the init method. Oh, and for what it's worth, the form class is a Toplevel form.

BTW, I had not looked at the entire thread until now, so I missed the input from the other guys.

While Marcia's approach probably does what it's supposed to, it sures does seem complicated.

Bearing in mind that only one object, whether it's in a grid or not, can have the focus, that object alone, most likely being the last one edited, is the one that will cause the Tableupdate ()to fail. (Right?)

What's wrong with a This.Setfocus in the commandbutton's Click method, or am I being overly optimistic here?


>Peter,
>
>I beg to differ back. *bg*
>
>You have not used AddObject() in your code below. There is a fundamental difference between AddObject() and CreateObject(). They both instantiate objects, but AddObject() puts the object into an existing containership hierarchy. Which makes the object show up in the parent's objects[] collection and populates the object's .Parent property.
>
>I won't get a chance to play with your new code until later tonight though.
>
>>I beg to differ. In fact I found something mentioned here on the UT a while back, and it seems to work ok.
>>
>>In the forms activate method I simply place the following code:
>>
>>
>>IF TYPE('This.oToolbar.Name') # 'C'
>>	THIS.ADDPROPERTY('oToolbar',.NULL.)
>>	THIS.oToolBar = CREATEOBJECT('_ToolBar')
>>ENDIF
>>THIS.oToolBar.SHOW
>>THIS.oToolBar.REFRESH(THISFORM.DataChanged)
>>
>>
>>
>>>Peter,
>>>
>>>I never use formsets either.
>>>
>>>You can not AddObject() a toolbar to a form. How exactly are you instantiating the toolbar?
>>>
>>>>There's something amiss here, because _screen.ActiveForm.ActiveControl
>>>>never evaluates to "O". Might it be because I don't use formsets?
>>>>I use classes and Addobject to add the toolbar to the form.
>>>>Is there another way?
Peter Pirker


Whosoever shall not fall by the sword or by famine, shall fall by pestilence, so why bother shaving?

(Woody Allen)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform