[AccessD] SysCmd constant conflict

Stuart McLachlan stuart at lexacorp.com.pg
Sun Aug 17 18:21:22 CDT 2003


On 17 Aug 2003 at 18:36, Susan Harkins wrote:

> > > > 'acObjStateNew   The object is new   4
> >
> > It is just a case different bits being set as flags for the various
> > states. So adding up the bit flags you get the following possible
> > states.
> >
> > Closed =0
> > Open old unchanged = 1
> > Open old dirty  = 3  (1 + 2)
> > Open new unchanged = 5  (1 + 4)
> > Open new dirty = 7  (4 + 1 + 2)
> 
> ========Then why set a constant named acObjStateNew to 4 -- if the object
> actually returns 5? 

Because you are asking the object to return an indicator of its 
state, which is a combination of three different aspects , each of 
which has it's own constant.


>Other constants don't work like this.

Many do.  

> This seems
> terribly confusing -- you're looking for 4, not 5. I'm sorry, but this seems
> horribly inconsistent with other constants I'm familiar with -- I have never
> run into this before.
> 

You've never done anything like in a messagebox?
"vbDefaultButton2 + vbCritical + vbOKCancel +vbApplicationModal"
The sum of these constants determines the actual state of the 
messagebox.

How about setting/returning file attributes?
"vbHidden + vbSystem + vbReadOnly"

 
-- 
Lexacorp Ltd
http://www.lexacorp.com.pg
Information Technology Consultancy, Software Development,System 
Support.





More information about the AccessD mailing list