FORUMS
Remove All Ads from XDA

[UTILITY] Lua 5.1 tools: compiler, decompiler, snippets & extendable lua.dll with SDK

1,061 posts
Thanks Meter: 877
 
Post Reply Email Thread
23rd March 2009, 03:07 PM |#281  
avimak's Avatar
Senior Member
Thanks Meter: 0
 
More
Not working...

in the next files:
Code:
contactpickerallscript.lua
contactpickerscript.lua
peopleallscript.lua
peoplefavoriteglobal.lua
peopleselectcontactscript.lua
I changed the:
Code:
local l_10_1 = string.char(l_10_0 + 65)
to:
Code:
LetterArray = {[0] = "׳�",
[1] = "׳‘",
[2] = "׳’",
[3] = "׳“",
[4] = "׳”",
[5] = "׳•",
[6] = "׳–",
[7] = "׳—",
[8] = "׳˜",
[9] = "׳™",
[10] = "׳›",
[11] = "׳œ",
[12] = "׳ž",
[14] = "ס",
[13] = "׳*",
[15] = "׳¢",
[16] = "׳₪",
[17] = "׳¦",
[18] = "׳§",
[19] = "׳¨",
[20] = "׳©",
[21] = "׳×",
[22] = "A",
[23] = "H",
[24] = "S",
[25] = "Z"}
  local l_10_1 = LetterArray[l_10_0]
  if l_10_1 == nil then
  l_10_1 = "A"
  end
And it crashed.... not even opened the contacts page.

but after I changed each file with his l_*_*, for example:
for
Code:
local l_16_1 = string.char(l_10_0 + 65)
i changed your code to
Code:
  local l_16_1 = LetterArray[l_10_0]
  if l_16_1 == nil then
  l_16_1 = "A"
  end
It shows me the slider and handle the press/release as always but no effect on the list itself...

maybe I didn't understand your instruction correctly, can you change one of those files in a way you think it should work so i'll understand it better?
 
 
23rd March 2009, 03:33 PM |#282  
avimak's Avatar
Senior Member
Thanks Meter: 0
 
More
can be deleted, I posted it again...
23rd March 2009, 03:34 PM |#283  
sztupy's Avatar
OP Inactive Recognized Developer
Flag London
Thanks Meter: 877
 
Donate to Me
More
Quote:
Originally Posted by avimak

Not working...

in the next files:

Code:
contactpickerallscript.lua
contactpickerscript.lua
peopleallscript.lua
peoplefavoriteglobal.lua
peopleselectcontactscript.lua
I changed the:
Code:
local l_10_1 = string.char(l_10_0 + 65)
to:
Code:
LetterArray = {[0] = "׳�",
[1] = "׳‘",
[2] = "׳’",
[3] = "׳“",
[4] = "׳”",
[5] = "׳•",
[6] = "׳–",
[7] = "׳—",
[8] = "׳˜",
[9] = "׳™",
[10] = "׳›",
[11] = "׳œ",
[12] = "׳ž",
[14] = "ס",
[13] = "׳*",
[15] = "׳¢",
[16] = "׳₪",
[17] = "׳¦",
[18] = "׳§",
[19] = "׳¨",
[20] = "׳©",
[21] = "׳×",
[22] = "A",
[23] = "H",
[24] = "S",
[25] = "Z"}
  local l_10_1 = LetterArray[l_10_0]
  if l_10_1 == nil then
  l_10_1 = "A"
  end
And it crashed.... not even opened the contacts page.

but after I changed each file with his l_*_*, for example:
for
Code:
local l_16_1 = string.char(l_10_0 + 65)
i changed your code to
Code:
  local l_16_1 = LetterArray[l_10_0]
  if l_16_1 == nil then
  l_16_1 = "A"
  end
It shows me the slider and handle the press/release as always but no effect on the list itself...

maybe I didn't understand your instruction correctly, can you change one of those files in a way you think it should work so i'll understand it better?

No, it simply does not work. I'll look at it someday, but a bit later
23rd March 2009, 03:36 PM |#284  
avimak's Avatar
Senior Member
Thanks Meter: 0
 
More
Good news!
I just found out that if i'm changing the right pointer too the English part of the Array is working.

for example:
local l_16_1 = LetterArray[l_16_0]
and in another file:
local l_12_1 = LetterArray[l_12_0]
Etc...

and then, the:
Code:
[22] = "A",
[23] = "H",
[24] = "S",
[25] = "Z"}
part of my array is working great!
even if i'm deleting the
Code:
  if l_16_1 == nil then
  l_16_1 = "A"
  end
part...

Still, no luck with the Hebrew letters.
23rd March 2009, 03:37 PM |#285  
sztupy's Avatar
OP Inactive Recognized Developer
Flag London
Thanks Meter: 877
 
Donate to Me
More
Quote:
Originally Posted by avimak

Still, no luck with the Hebrew letters.

Try replacing this:
local l_10_2 = ContactObj.ContactList:GetLetterIndex(tostring(l_1 0_1)) + ContactObj.offset

with this:

local l_10_2 = ContactObj.ContactList:GetLetterIndex(l_10_1) + ContactObj.offset

maybe...
23rd March 2009, 03:51 PM |#286  
avimak's Avatar
Senior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by sztupy

Try replacing this:
local l_10_2 = ContactObj.ContactList:GetLetterIndex(tostring(l_1 0_1)) + ContactObj.offset

with this:

local l_10_2 = ContactObj.ContactList:GetLetterIndex(l_10_1) + ContactObj.offset

maybe...

Nope

only the
Code:
[22] = "A",
[23] = "H",
[24] = "S",
[25] = "Z"}
of my Array is working while scrolling...
The Hebrew letters only kick it to the head of the contacts..

any other Idea? maybe I can write it "one by one" and not through array?
thanks for helping man
I'm sure it'll be helpful for a lot of users (probably any Unicode user)
23rd March 2009, 04:52 PM |#287  
sztupy's Avatar
OP Inactive Recognized Developer
Flag London
Thanks Meter: 877
 
Donate to Me
More
Quote:
Originally Posted by avimak

Nope

only the

Code:
[22] = "A",
[23] = "H",
[24] = "S",
[25] = "Z"}
of my Array is working while scrolling...
The Hebrew letters only kick it to the head of the contacts..

any other Idea? maybe I can write it "one by one" and not through array?
thanks for helping man
I'm sure it'll be helpful for a lot of users (probably any Unicode user)

You might be out of luck, GetLetterIndex is a non-lua function, and if that function can't handle unicode characters then you can't use it to determine the starting position. There might be workarounds (like getting all contacts and seardching through them), but I don't know if this is possible.
23rd March 2009, 05:23 PM |#288  
avimak's Avatar
Senior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by sztupy

You might be out of luck, GetLetterIndex is a non-lua function, and if that function can't handle unicode characters then you can't use it to determine the starting position. There might be workarounds (like getting all contacts and seardching through them), but I don't know if this is possible.

I can't believe it's not an Unicode supporter...
What about the Arabic/Russian/German/Chinese devices? they always have solution for them, even for the RandomAccess in the old contacts screen - they had sliders in Russian or Arabic...

What's that second thing you said? I didn't get it...
24th March 2009, 03:52 AM |#289  
sztupy's Avatar
OP Inactive Recognized Developer
Flag London
Thanks Meter: 877
 
Donate to Me
More
Advertisement

I've made some tools that will display mode9 files on the computer.
Topic

I've also set up a wiki with a lot of autogenerated content regarding mode9 development (and maybe lua later on):
http://msdn.winmo.sztupy.hu/
24th March 2009, 03:54 AM |#290  
sztupy's Avatar
OP Inactive Recognized Developer
Flag London
Thanks Meter: 877
 
Donate to Me
More
Quote:
Originally Posted by avimak

I can't believe it's not an Unicode supporter...
What about the Arabic/Russian/German/Chinese devices? they always have solution for them, even for the RandomAccess in the old contacts screen - they had sliders in Russian or Arabic...

What's that second thing you said? I didn't get it...

As I see the letterpicker part of rhodium2 is not unicode aware...

I meant read all of the contacts one by one (dunno how to do this, but should be possible), and check whether it starts with the character you specified.
24th March 2009, 04:46 AM |#291  
smotrs's Avatar
Senior Member
Flag So. Calif.
Thanks Meter: 0
 
More
Quote:
Originally Posted by sztupy

Advertisement

I've made some tools that will display mode9 files on the computer.
Topic

I've also set up a wiki with a lot of autogenerated content regarding mode9 development (and maybe lua later on):
http://msdn.winmo.sztupy.hu/

Nice, very very nice.
Post Reply Subscribe to Thread

Tags
lua, manila, mod, tf3d, touchflo

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes