Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
5
Erster Beitrag:
vor 9 Jahren, 10 Monaten
Letzter Beitrag:
vor 9 Jahren, 10 Monaten
Beteiligte Autoren:
KenKnight, Mitchell

dotnet code to windev mobile code

Startbeitrag von Mitchell am 15.08.2008 15:40

Dear Windev Coders,

Please help me how to convert this dotnet code to windev code :

int tagsread
inventory testinventory = new inventory();

tagsread = testinventory.Countclass[1]

tagIDs = new string[tagsread]

for (int i=0; i

Antworten:

Hi Mitch,

Try the following;

tagsread is int
// make sure you add the inventory .net class to your project
testinventory is object inventory

tagsread = testinventory:Countclass[1]

//create array with number elements matching
// the # of tags read
tagsID is array of tagsread string

for i = 0 to (tagsread - 1)
tagsID = testinventory:ToArray():ToString()
end

The above is completely untested and since I don't know exactly what type of object testInventory is, you'll have to experiment with the the testinventory.ToArray() line. You may into having to implement an intermediant object of .Net Collection.

In WinDev v12 there is a .Net example that shows how to get the process list from the machine. Check that out for more info.

Cheers!
Ken


von KenKnight - am 17.08.2008 17:36
Hi Mitch,

Try the following;

tagsread is int
// make sure you add the inventory .net class to your project
testinventory is object inventory

tagsread = testinventory:Countclass[1]

//create array with number elements matching
// the # of tags read
tagsID is array of tagsread string

for i = 0 to (tagsread - 1)
tagsID = testinventory:ToArray():ToString()
end

The above is complete untested and since I don't know exactly what type of object testInventory is, you'll have to experiment the most will the the testinventory.ToArray() line. You may into having to implement an intermediant object of .Net Collection.

In WinDev v12 there is a .Net example that shows how to get the process list from the machine. Check that out for more info.

Cheers!
Ken


von KenKnight - am 17.08.2008 17:37
Hi Mitch,

Try the following;

tagsread is int
// make sure you add the inventory .net class to your project
testinventory is object inventory

tagsread = testinventory:Countclass[1]

//create array with number elements matching
// the # of tags read
tagsID is array of tagsread string

for i = 0 to (tagsread - 1)
tagsID = testinventory:ToArray():ToString()
end

The above is complete untested and since I don't know exactly what type of object testInventory is, you'll have to experiment the most will the the testinventory:ToArray() line. You may into having to implement an intermediant object of .Net Collection.

In WinDev v12 there is a .Net example that shows how to get the process list from the machine. Check that out for more info.

Cheers!
Ken


von KenKnight - am 17.08.2008 23:46
Hi Ken,
thanks for the reply,u send 3 times, unfortunately it is still not working. I also puzzled how to code it in windev.

the following line is giving an error or not accepted :

tagsID = testinventory:ToArray():ToString() ---> not accepted in windev

tagsread = testinventory:Countclass[1] ---> doesnt support this type of assignment [ ]



help please :-(


von Mitchell - am 18.08.2008 06:51
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.