English
Forum

List view with Header Save

 
- Page 1 -



Uwe
Lang
I have in my Program with the List view.dll one List view prepares. now would like I the Content as CSV Save file together with the Header the scheduler. How must I the Speicherbereich of HeaderToCSV (lvhed#) in WriteFileQuick install so the Header and the Tabelleninhalt together in a File stored becomes?
night etlichen erfolglosen try white I do not moreover.
Proc CSV_Speichern

    Declare tx$,xs&,lvber#,hd&,lvhed#
    Dim lvhed#,1848'amount Split * 264
    tx$ = datname$
    xs&=GetNeededMemory(lv&,1)
    Dim lvber#, xs&
    hd&=HeaderToCsv(lv&,lvhed#,59,1)
    xs&=ListviewToCsv(lv&,lvber#,59,1)
    WriteFileQuick(addr(tx$),lvber#,0,(hd& + xs&))
    Dispose lvber#
    Dispose lvhed#

ENDPROC

 
XProfan X2
Gruß,
Uwe Lang

(Windows 10, XProfan X3) 
09/14/15  
 



« this Posting watts as Solution marked. »


H.Brill
How I see, have you got indeed XProfan X3.
one can thoroughly one List view, with the the
List view.dll prepares been is, with XProfans
own functions Edit. its so
neither absolutely prescribed, whom
Content the List view in a Speicherbereich To
schieben, circa this then with WritFileQuick()
To Save.
into subesquent Procs use I The marvellous
new Move-functions :
Proc load

    Declare Int bytes1, bytes2
    Declare String Header
    ClearList 0
    Move("FileToList", File)
    Header = GetString$(0, 0)' here have you got The Headerzeile
    DeleteString(0, 0)
    ' The Headerzeile simply in Header Save and the
    ' Listboxliste delete. now can you with the Header
    ' make, what You vorhast or want.
    ClearList grid
    Move("ListToHandle", grid)

ENDPROC

Proc save

    Declare Memory area1
    Dim area1, 256
    Declare Int bytes1, bytes2, anzahlColumns
    Declare String Header
    anzahlColumns = GetColumns(grid)

    WhileLoop 0, anzahlColumns - 1

        Clear area1
        GetColumnName(grid, area1, &LOOP)

        If &LOOP < (anzahlColumns - 1)

            Header = Header + String $(area1, 0) + ","

        Else

            Header = Header + String $(area1, 0)

        EndIf

    EndWhile

    ClearList 0
    AddStrings(0, Header)
    Move("HandleToList", grid)
    Move("ListToFile", File)
    Messagebox(File + " gespeichert", "Info", 0)
    Dispose area1

ENDPROC


the lever grid is a with the List view.dll erstelltes
List view. the works by me wonderful.
How one sees, can The advantages list view.dll
(editierbare boxes, PrintListview etc.) with the new
Vorteilen of XProfan X3 lovely join. the goes
too differently rum, means a with XProfan erstellte GridBOX
and the functions list view.dll.

PS : whether there now one comma or one | between whom
Einträgen standing, might alike his. If it you disturbing,
can you tappt im dunkeln Yes replace.
I hope, I could you something help.
 
Benutze XPROFAN X3 + FREEPROFAN
Wir sind die XProfaner.
Sie werden von uns assimiliert.
Widerstand ist zwecklos!
Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.

Was die Borg können, können wir schon lange.
09/20/15  
 



How I the see writes writefilequick 1 memory in 1 File.

Reserviere you 1 memory so big How lvhed# and lvber# together.

copy lvhed# and lvber# into new memory.

writefilequick new memory.
DEF @copymem(3) !"kernel32","RtlMoveMemory"
declare mem#
dim mem#,sizeof(lvhed#)+sizeof(lvber#)
copymem(addr(mem#),addr(lvhed#),sizeof(lvhed#))
copymem(addr(mem#)+sizeof(lvhed#),addr(lvber#),sizeof(lvber#))
... writefilequick ... mem#

code ungetestet here simply reingepinselt only to that understanding.
 
09/14/15  
 




Uwe
Lang
thanks for speedy response,
had I in similar shape already. with the same Result, the Header becomes written and thereafter becomes the Content the data base utterly moved. the sees so from as though The Size the Speicherbereichs the Headers larger is as accounts b.z.w pretended.
I must over the trouble once more in silence cogitate.
 
XProfan X2
Gruß,
Uwe Lang

(Windows 10, XProfan X3) 
09/14/15  
 




H.Brill
lvhead# is indeed not big enough.
best is it, The Number of tatsächlichen
Split To detect. Also are The Kommas
(amount decompose - 1) moreover To calculate. If as
Flag with HeaderToCSv() yet The quotation marks
moreover come (Flag = 0) must You too yet per
slot two " mitrechnen. Also is yet the
Nullbyte end the Strings in the area moreover To
count.

very these amount bring you then HeaderToCsv().
there one whom area decompose * 264 + The zus. Kommas
etc.take must (with GetColumns(H) get one
Yes The amount Split the Grid out), would it on the
best, a self-contained area with the Result
of HeaderToCsv() To dimmen and soviele
Bytes of middle-aged area into new To copy.

i think time, this is the Sicherste.
 
Benutze XPROFAN X3 + FREEPROFAN
Wir sind die XProfaner.
Sie werden von uns assimiliert.
Widerstand ist zwecklos!
Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.

Was die Borg können, können wir schon lange.
09/15/15  
 




Uwe
Lang
I come first now moreover To Answer,
so How I the trouble solve wished have I not hinbekommen. I have the whole first once as Notlösung so made, that I into List view a vain row on position 0 einfüge and thereafter The Spaltenköpfe choose and the Text into suitable boxes eintrage. After the Save entferne I The row again from the List view. the short Geruckel falls not, I to the Save yet Data from another List view hineinkopiere.
nevertheless thanks for Notes.
If I again little more Time have, I will me the trouble once more look at.
 
XProfan X2
Gruß,
Uwe Lang

(Windows 10, XProfan X3) 
09/20/15  
 




H.Brill
How I see, have you got indeed XProfan X3.
one can thoroughly one List view, with the the
List view.dll prepares been is, with XProfans
own functions Edit. its so
neither absolutely prescribed, whom
Content the List view in a Speicherbereich To
schieben, circa this then with WritFileQuick()
To Save.
into subesquent Procs use I The marvellous
new Move-functions :
Proc load

    Declare Int bytes1, bytes2
    Declare String Header
    ClearList 0
    Move("FileToList", File)
    Header = GetString$(0, 0)' here have you got The Headerzeile
    DeleteString(0, 0)
    ' The Headerzeile simply in Header Save and the
    ' Listboxliste delete. now can you with the Header
    ' make, what You vorhast or want.
    ClearList grid
    Move("ListToHandle", grid)

ENDPROC

Proc save

    Declare Memory area1
    Dim area1, 256
    Declare Int bytes1, bytes2, anzahlColumns
    Declare String Header
    anzahlColumns = GetColumns(grid)

    WhileLoop 0, anzahlColumns - 1

        Clear area1
        GetColumnName(grid, area1, &LOOP)

        If &LOOP < (anzahlColumns - 1)

            Header = Header + String $(area1, 0) + ","

        Else

            Header = Header + String $(area1, 0)

        EndIf

    EndWhile

    ClearList 0
    AddStrings(0, Header)
    Move("HandleToList", grid)
    Move("ListToFile", File)
    Messagebox(File + " gespeichert", "Info", 0)
    Dispose area1

ENDPROC


the lever grid is a with the List view.dll erstelltes
List view. the works by me wonderful.
How one sees, can The advantages list view.dll
(editierbare boxes, PrintListview etc.) with the new
Vorteilen of XProfan X3 lovely join. the goes
too differently rum, means a with XProfan erstellte GridBOX
and the functions list view.dll.

PS : whether there now one comma or one | between whom
Einträgen standing, might alike his. If it you disturbing,
can you tappt im dunkeln Yes replace.
I hope, I could you something help.
 
Benutze XPROFAN X3 + FREEPROFAN
Wir sind die XProfaner.
Sie werden von uns assimiliert.
Widerstand ist zwecklos!
Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.

Was die Borg können, können wir schon lange.
09/20/15  
 




H.Brill
here another Abfallprodukt, circa rather Stringadressen
in a area To shovel, where vorteilhaft is, that
it too I really goes. is anyway plainer, as
particular with the Bereichsbefehlen To hantieren.
SItem() list view.dll desires Yes something like :
SUBPROC Move.StringAdrToMem

    Parameters String s, String d, Memory B
    ' s = the zusammengesetzte String
    ' d = the Trenner
    ' B = the area
    Declare Long number
    Declare String TArray[]
    ClearList 0
    Clear B, TArray[]
    number = Move("StrToList", s, d)
    number = Move("ListToArr", TArray[])
    Var Int z = 0

    WhileLoop 0, number - 1

        Long B, z = Addr(TArray[&LOOP])
        Inc z, 4

    EndWhile

    Return number

ENDPROC

Declare Memory area
Dim area, 12' for 3 Stringadressen
Clear area
Move("StringAdrToMem", "Maier,Hamburg,4711", ",", area)
SItem(grid, area, 3)
Clear area
entry = "Müller,Berlin,4714"
Move("StringAdrToMem", entry, ",", area)
SItem(grid, area, 3)

Perhaps can it Yes someone need.
 
Benutze XPROFAN X3 + FREEPROFAN
Wir sind die XProfaner.
Sie werden von uns assimiliert.
Widerstand ist zwecklos!
Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.

Was die Borg können, können wir schon lange.
09/21/15  
 



certainly, but here in this Topic would it it Yes not find.

rather here with whom Quelltexten post:  [...] 
 
09/21/15  
 




H.Brill
there have you got right.
though I do not white, Why obiges functions.
having to some Time the ausprobiert and was astonishes.
usually should still to the Proc or. SubProc
the TArray[] again released been his or. not
More existieren. the TArray[] is Yes pub definiert.
accordingly should too The Stringadressen in this not
More existieren. nevertheless can tappt im dunkeln outside benefit.

I could me not more than think, that these Arrays
nevertheless global are.

or has otherwise yet someone a Statement for ?
 
Benutze XPROFAN X3 + FREEPROFAN
Wir sind die XProfaner.
Sie werden von uns assimiliert.
Widerstand ist zwecklos!
Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.

Was die Borg können, können wir schon lange.
09/21/15  
 



there's there naturally several Mgl.

to exclude is vlt, that with:

proc so
declare lala[]
the lala of Roland global as __int__proc_so_lala[] processing
becomes because otherwise would z.B. Rekursion not functions.
functions tappt im dunkeln?

I wealth sooner, that here windows does what it always does:
Speicherhandle enable but Speicherinhalt thereby not antasten
and simply überschreiben if time again needed.

or Roland has simply again one own management drübergelegt.
 
09/22/15  
 




H.Brill
I faith, with your supposition with windows
have you got right. Have time something played :
Declare Long t[]
Cls
TesteArray()
Print
Print t[0], String $(t[0], 0)
Print t[1], String $(t[1], 0)
Print "Addresse : "; t[0]; " Content : "; String $(t[0], 0)
Print "Addresse : "; t[1]; " Content : "; String $(t[1], 0)
Print t[0], String $(t[0], 0)
Print t[1], String $(t[1], 0)
WaitKey
End

Proc TesteArray

    Declare String lokalarray[]
    lokalarray[0] = "Hallo"
    lokalarray[1] = "Welt"

    WhileLoop 0, 1

        Print lokalarray[&LOOP]
        t[&LOOP] = Addr(lokalarray[&LOOP])

    EndWhile

    Clear lokalarray[]

ENDPROC


means, leave can itself hereon not. the
sees one, if over again Strings ("blabla") with in that
game come. therefore is caution geboten,
if between Proc-appeal and Weiterverabeitung
yet what other made becomes.
 
Benutze XPROFAN X3 + FREEPROFAN
Wir sind die XProfaner.
Sie werden von uns assimiliert.
Widerstand ist zwecklos!
Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.

Was die Borg können, können wir schon lange.
09/22/15  
 




Uwe
Lang
After längerer absence come I first now again moreover, me the trouble once more To consecrate.
I have now The supra beschriebene Variante chosen and everything with the XProfan Bordmitteln resolved.

my Thanks all, The me with the suggestions helped having.
 
XProfan X3
Gruß,
Uwe Lang

(Windows 10, XProfan X3) 
10/22/15  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

12.467 Views

Untitledvor 0 min.
Sven Bader02/13/23
Uwe Lang04/13/20
p.specht10/21/19
RudiB.08/08/19
More...

Themeninformationen

this Topic has 3 subscriber:

H.Brill (5x)
iF (4x)
Uwe Lang (4x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie