Welcome! Log In Create A New Profile

Advanced

dotnet code to windev mobile code

Posted by Mitchell 
Mitchell
dotnet code to windev mobile code
August 15, 2008 05:40PM
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<tagsread; i++)
{
tagIDs = testinventory.ToArray() .ToString();
}

=====================================
what is the equivalent Windev Mobile code?


regards
Mitch
KenKnight
Re: dotnet code to windev mobile code
August 17, 2008 07:36PM
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
KenKnight
Re: dotnet code to windev mobile code
August 17, 2008 07:37PM
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
KenKnight
Re: dotnet code to windev mobile code
August 18, 2008 01:46AM
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
Mitchell
Re: dotnet code to windev mobile code
August 18, 2008 08:51AM
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 :-(
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: