Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
7
Erster Beitrag:
vor 8 Jahren, 5 Monaten
Letzter Beitrag:
vor 8 Jahren, 5 Monaten
Beteiligte Autoren:
günther, Al, Günther, Arie

store the size and the positon of the windows

Startbeitrag von Günther am 25.06.2009 10:16

hello all,

i have a problem!

I work at a small program.
8 employees can data from different computer to import.

the interface can adapt for each employee.

example:
a window displays a table of all the information: name, occupation and address
good for employees A
but employees B need alone the name, not occupation or adress.
i can whit a right click hide the occupation and adress.
but the window displays after each new start again all the information.

by employees C and F saves the program the settings,
but for all other staff will lose the settings.

the solution from my friend

initializtion the project:
InitParameter(paramXML, NoSpace(GLOGebruiker) +".xml")

danke jan:-)

BUT...While there are the files well, and also what is written inside, but the program does not read out again.and now lose employees C and F all settings to.


somebody has an idea?

Antworten:

Hello Gunther

If you want to have different settings for your 8 users then you would end up with 8 parameter files.
After the user logs into your app, their user name, should be the source parameter for the parameter file. InitParameter(paramXML, NoSpace(CurrentUserName) +".xml")

Does your parameter NoSpace(GLOGebruiker) +".xml" represent the current user name ?

Regards
Al


von Al - am 25.06.2009 11:42
hi Al,

thanks..

for each user is generated a file and date and time are correct. The values are stored. but the stored datas do not play out.



GLOGebruiker is string = NetworkUser()
InitParameter(paramXML, NoSpace(GLOGebruiker) +".xml")

yes, its represent the current user name

regards
gunny

von günther - am 25.06.2009 12:25
Hello Gunther

It seems you are doing everything right, so maybe the problem is in the fact that you are using the xml option.

I would try again but use the ini file option ?


Regards
Al

von Al - am 25.06.2009 12:40
hello Al,

this is perhaps still a possibility.

I will try
thank you for your help :-)

Regards
gunny


von günther - am 25.06.2009 12:45
Günther ,
I'm storing the usersettings into the database, to avoid having ini/xml files around. Second, I can delete or even change usersettings for every user (which coul be handy for support reasons), without access to his/her local pc.
And it works at least in WD12.

Extra info:
The settings, stored in a string this way, are still in XML-format.
I found that using xml/string is much faster than ini-files, especially when closing screens with a number of tables/loopers.

Some code snippets:
(Tbl_Employees.PersistentValues is a text-memofield.)

gsUserPersistentValues is string // Note: global var

Load:
IF HReadSeekFirst(Tbl_Employees,EmployeeID,gnEmployee) THEN
gsUserPersistentValues = Tbl_Employees.PersistentValues
END

// USe an exception: in at least one case the XML contained an error.....
WHEN EXCEPTION IN
InitParameter(paramString,gsUserPersistentValues)
DO
gsUserPersistentValues = ""
InitParameter(paramString,gsUserPersistentValues)
END

Save:
Tbl_Employees.PersistentValues = gsUserPersistentValues
IF NOT HModify(Tbl_Employees) THEN
Error("some error")
END


Arie

von Arie - am 26.06.2009 06:43
hey all,...thanks for all coments and help.

I have my program in WinDev 14 compeliert and now it works. hihi

thank you all :-)

von Günther - am 29.06.2009 08:05
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.