Dear Friends,
I have a really really weird bug to report in relation to prefs – can anyone
explain this to me?

I have the following structure and save and load it as prefs(using PODS 1.2
as a compiler):
1. 
2. dies
3.  
4. typedef struct{
5.         UInt16 appNetRefNum;
6.         NetSocketRef socketRef;
7.         NetIPAddr addr;
8.         UInt16 port;
9.         char server[51];                // 50+1 Not sure on this one
10.         char channel[31];       // 30+1
11.         char nick[17];                  // 16+1
12.         char pass[17];                  // 16+1
13.         OptionsType display;
14.         
15.         struct
16.         {
17.                 Boolean enabled;
18.                 Boolean logPvt;
19.                 Boolean filePerChannel;
20.                 char volname[40];
21.                 char parent[256];
22.         }logging;
23.         
24.         //Copyright prefs
25.         UInt32 firstusesecs;
26.         char regcode[15];
} myIRCPreferenceType;

The copyright prefs can not be accessed or rather turn out as zero when the
structure is read into memory. However, when I change the structure around
to put the defines at the top, the program suddenly works(below):
27. works
28.  
29. typedef struct{
30.                 //Copyright prefs
31.         UInt32 firstusesecs;
32.         char regcode[15];
33.         UInt16 appNetRefNum;
34.         NetSocketRef socketRef;
35.         NetIPAddr addr;
36.         UInt16 port;
37.         char server[51];                // 50+1 Not sure on this one
38.         char channel[31];       // 30+1
39.         char nick[17];                  // 16+1
40.         char pass[17];                  // 16+1
41.         OptionsType display;
42.         
43.         struct
44.         {
45.                 Boolean enabled;
46.                 Boolean logPvt;
47.                 Boolean filePerChannel;
48.                 char volname[40];
49.                 char parent[256];
50.         }logging;
51.         
52.  
53. } myIRCPreferenceType;
54.  


Anybody any ideas on what is going on here?

Best regards from Vienna
Tam Hanna


-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to