Default when deleting a record - how to change? - 2nd post 
Author Message
 Default when deleting a record - how to change? - 2nd post

If I choose "Standard Warning" when deleting a record it gives me a box with
YES and NO.
It appears that the default button is YES. This is not good. Is there a way
I can change this?

Thank you - Ed Campbell
C55g



Thu, 10 Nov 2005 05:12:15 GMT  
 Default when deleting a record - how to change? - 2nd post
Ed,
The delete message is getting issued from a call to the file's Relation
manager in the Window's PrimeUpdate method. The actual chain of events is:

    1. The Window's Init call's the PrimeUpdate
    2. The Window's PrimeUpdate calls the Relation Manager's Delete
    3. The Relation Manager's Delete calls the File Manager's Throw
    4. The File Manager's Throw calls the ErrorManagers Throw
    5. The ErrorManagers Throw calls the ErrorManager's TakeUser
    6. The .TakeUser pop's the message with the Yes button hardcoded as the
default.

I skipped a few in here, but this is the general flow.

The easiest option would be to change the window from "Standard Warning" to
auto-delete, and issue your own message in the window's PrimeUpdate before
the parent call, if the user responds "No" set Self.Response to
RequestCanceled and return Level:Fatal.

If you want a more global solution, you can either directly modify the
ABError.clw to default all user level messages to Button:No, or subclass
either the error, file, or relation managers to suit your needs.

-Mike


Quote:
> If I choose "Standard Warning" when deleting a record it gives me a box
with
> YES and NO.
> It appears that the default button is YES. This is not good. Is there a
way
> I can change this?

> Thank you - Ed Campbell
> C55g



Fri, 11 Nov 2005 00:47:44 GMT  
 Default when deleting a record - how to change? - 2nd post
Hi Michel
You say just subclass the file manager.  Can you please tell mee how to do
that.  I dont think you can because lots of the properties and methods are
PRIVATE.

SOFTVELOCITY!!!  Please remove this in C6.  I'm a developer and I want to do
what I want when I develope.  Dont put any restrictions in the classes.  Ore
at least make it possible to subclass in some way.

--
Ole-Morten Heien
HD Software
www.hdsoftware.no

ICQ: 72785878


Quote:
> Ed,
> The delete message is getting issued from a call to the file's Relation
> manager in the Window's PrimeUpdate method. The actual chain of events is:

>     1. The Window's Init call's the PrimeUpdate
>     2. The Window's PrimeUpdate calls the Relation Manager's Delete
>     3. The Relation Manager's Delete calls the File Manager's Throw
>     4. The File Manager's Throw calls the ErrorManagers Throw
>     5. The ErrorManagers Throw calls the ErrorManager's TakeUser
>     6. The .TakeUser pop's the message with the Yes button hardcoded as
the
> default.

> I skipped a few in here, but this is the general flow.

> The easiest option would be to change the window from "Standard Warning"
to
> auto-delete, and issue your own message in the window's PrimeUpdate before
> the parent call, if the user responds "No" set Self.Response to
> RequestCanceled and return Level:Fatal.

> If you want a more global solution, you can either directly modify the
> ABError.clw to default all user level messages to Button:No, or subclass
> either the error, file, or relation managers to suit your needs.

> -Mike



> > If I choose "Standard Warning" when deleting a record it gives me a box
> with
> > YES and NO.
> > It appears that the default button is YES. This is not good. Is there a
> way
> > I can change this?

> > Thank you - Ed Campbell
> > C55g



Fri, 11 Nov 2005 17:41:56 GMT  
 Default when deleting a record - how to change? - 2nd post
Ole,
In this case the Throw method is not one of those that are private.  In the
more general case, as long as you're not a third party developer, I don't
have a problem editing the .inc files to remove the Protected and Private
key words where needed.  I see them more as warnings then road blocks.
Another way for SV to say "if you don't know what you're doing, don't play
with this! It's not documented and you can break a lot stuff." <g>

-Mike


Quote:
> Hi Michel
> You say just subclass the file manager.  Can you please tell mee how to do
> that.  I dont think you can because lots of the properties and methods are
> PRIVATE.

> SOFTVELOCITY!!!  Please remove this in C6.  I'm a developer and I want to
do
> what I want when I develope.  Dont put any restrictions in the classes.
Ore
> at least make it possible to subclass in some way.

> --
> Ole-Morten Heien
> HD Software
> www.hdsoftware.no

> ICQ: 72785878



> > Ed,
> > The delete message is getting issued from a call to the file's Relation
> > manager in the Window's PrimeUpdate method. The actual chain of events
is:

> >     1. The Window's Init call's the PrimeUpdate
> >     2. The Window's PrimeUpdate calls the Relation Manager's Delete
> >     3. The Relation Manager's Delete calls the File Manager's Throw
> >     4. The File Manager's Throw calls the ErrorManagers Throw
> >     5. The ErrorManagers Throw calls the ErrorManager's TakeUser
> >     6. The .TakeUser pop's the message with the Yes button hardcoded as
> the
> > default.

> > I skipped a few in here, but this is the general flow.

> > The easiest option would be to change the window from "Standard Warning"
> to
> > auto-delete, and issue your own message in the window's PrimeUpdate
before
> > the parent call, if the user responds "No" set Self.Response to
> > RequestCanceled and return Level:Fatal.

> > If you want a more global solution, you can either directly modify the
> > ABError.clw to default all user level messages to Button:No, or subclass
> > either the error, file, or relation managers to suit your needs.

> > -Mike



> > > If I choose "Standard Warning" when deleting a record it gives me a
box
> > with
> > > YES and NO.
> > > It appears that the default button is YES. This is not good. Is there
a
> > way
> > > I can change this?

> > > Thank you - Ed Campbell
> > > C55g



Sat, 12 Nov 2005 21:50:04 GMT  
 Default when deleting a record - how to change? - 2nd post
Thanks for the advice Michael.

Ed


Quote:
> Ed,
> The delete message is getting issued from a call to the file's Relation
> manager in the Window's PrimeUpdate method. The actual chain of events is:

>     1. The Window's Init call's the PrimeUpdate
>     2. The Window's PrimeUpdate calls the Relation Manager's Delete
>     3. The Relation Manager's Delete calls the File Manager's Throw
>     4. The File Manager's Throw calls the ErrorManagers Throw
>     5. The ErrorManagers Throw calls the ErrorManager's TakeUser
>     6. The .TakeUser pop's the message with the Yes button hardcoded as
the
> default.

> I skipped a few in here, but this is the general flow.

> The easiest option would be to change the window from "Standard Warning"
to
> auto-delete, and issue your own message in the window's PrimeUpdate before
> the parent call, if the user responds "No" set Self.Response to
> RequestCanceled and return Level:Fatal.

> If you want a more global solution, you can either directly modify the
> ABError.clw to default all user level messages to Button:No, or subclass
> either the error, file, or relation managers to suit your needs.

> -Mike



> > If I choose "Standard Warning" when deleting a record it gives me a box
> with
> > YES and NO.
> > It appears that the default button is YES. This is not good. Is there a
> way
> > I can change this?

> > Thank you - Ed Campbell
> > C55g



Thu, 17 Nov 2005 09:48:27 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. changing record(after deleting CHANGE button)

2. CW Debugger (Defaults) (2nd Posting)

3. Delete problem 2nd posting

4. Change of Default Button on Confirm Delete

5. Delete Confirmation Box - default changed.

6. Default when deleting - Can I change?

7. Changed Hash#delete / #default behaviour ?

8. Delete key on keyboard deleting records

9. Deleting current record based on next record

10. C5EEa - Record Not Available(33) when deleting a record

11. I need to be able to change between Insert,Change and Delete on the same form

12. How to change Record Filter when changing Tab

 

 
Powered by phpBB® Forum Software