|
Shaggar posted:I just don't like doing accessors that way, but w/e. I've never used android Linux java but I would guess theres some option to make it auto scale to you're items on screen, but who knows no the os is open it doesnt support constraint based layouts
|
# ? Aug 17, 2013 00:18 |
|
|
# ? Jun 6, 2024 06:29 |
|
LOL if Andoird doesn't let you just do the Java equivalent of gridView.center = screen.center;
|
# ? Aug 17, 2013 00:45 |
|
chumpchous posted:no the os is open it doesnt support constraint based layouts LOL
|
# ? Aug 17, 2013 00:46 |
|
Doc Block posted:LOL if Andoird doesn't let you just do the Java equivalent of gridView.center = screen.center; the issue is that the gridview widget has some hardcoded behavior where it fills it's parent. Usually the issue with centering widgets is a child widget not being in "just wrap whatever your content needs" mode and it accidentally fills parent and you go "omfg why is my poo poo left aligned gently caress i told it to be center!" because it's the full possible width. but even with a static column size there's no way to make it not just... fill horizontally, it will always fill horizontally as i spent a day testing the behavior. unless you set the entire width by hand (which is ugly to do since you shouldnt be working in pixel metrics but in a real life em-style measurement thing) i mean i could get the viewable rect for the parent of the gridview and then divide it based on the # of columns im working with and do some dpi math to get things consistent across platforms but no matter what solution wins, i lose basically gently caress everything
|
# ? Aug 17, 2013 00:58 |
|
LOL LMFAO that Android won't let you just say "make a view this big and put it in the center, and no, it can't get any bigger" like you can on iOS.
|
# ? Aug 17, 2013 01:08 |
|
Mido posted:the issue is that the gridview widget has some hardcoded behavior where it fills it's parent. Usually the issue with centering widgets is a child widget not being in "just wrap whatever your content needs" mode and it accidentally fills parent and you go "omfg why is my poo poo left aligned gently caress i told it to be center!" because it's the full possible width. this is literally worse than css. good job google
|
# ? Aug 17, 2013 03:36 |
|
Doc Block posted:LOL LMFAO that Android won't let you just say "make a view this big and put it in the center, and no, it can't get any bigger" like you can on iOS. i had to make this application for desktop, ios and android, desktop i was only allowed to use gtk and that was a loving mess the only fun ive had on this project is the ios version because ios ui stuff was conceptualized by people who want you to actually use their loving widgets except the apple version of this product will never see the light of day because you cant use the external accessorie framework to talk to arbitrary bluetooth devices unless you have mfi certifications or use bluetooth low-energy tech. but our product isnt gonna use btle because we need that distance but we are literally just trying to make a quick demo our customers can use to get rolling so getting mfi certification just for a quick babby demo seems like a waste of time also my manager is convinced im wrong about this mfi stuff and there "must be a way" to talk to bluetooth on ios "even if we have to code our own way!!" lol he looked at the mfi cert page for 1 second and literally skimmed the first paragraph and went "this is talking abut audio mfi stuff is just for audio you should recheck your notes" the intern sharing my cube read the page after that and understood it more than my manager
|
# ? Aug 17, 2013 20:23 |
|
Maybe you should quit your job.
|
# ? Aug 17, 2013 21:53 |
|
Skeleton Apologist posted:Maybe you should quit your job. this ball is already rolling following a convo i had with the vice president and we'll see what a clusterfuck this poo poo will evolve into on monday anyone hiring in portland? and/or northern cali. hmu
|
# ? Aug 17, 2013 22:20 |
|
Mido posted:i had to make this application for desktop, ios and android, desktop i was only allowed to use gtk and that was a loving mess As long as your company is legitimate, an mfi dev license is pretty easy to get. It's only when you want to build mass quantities do you have to talk to a manufacturer who already has a license. Or become a manufacturer, but that has really stringent rules.
|
# ? Aug 17, 2013 23:26 |
|
MeruFM posted:As long as your company is legitimate, an mfi dev license is pretty easy to get. It's only when you want to build mass quantities do you have to talk to a manufacturer who already has a license. we're building our own poo poo so we'd need the mfg license i believe
|
# ? Aug 17, 2013 23:48 |
|
guys i really want to use a goto
|
# ? Aug 26, 2013 16:29 |
|
Orbi posted:guys i really want to use a goto goto LABEL is fine just dont use goto LINE_NUMBER
|
# ? Aug 26, 2013 16:31 |
|
|
# ? Aug 26, 2013 16:32 |
|
uG posted:goto LABEL is fine just dont use goto LINE_NUMBER use COMEFROM
|
# ? Aug 26, 2013 17:47 |
|
Orbi posted:guys i really want to use a goto have you considered exceptions as program flow
|
# ? Aug 26, 2013 17:49 |
|
then your program design will truely be exceptional!!!
|
# ? Aug 26, 2013 17:50 |
|
Bloody posted:then your program design will truely be exceptional!!! use singletons everywhere everywhere
|
# ? Aug 26, 2013 17:50 |
|
UserManager::GetUserManager()->findUser("Mido")->setLaughs(UserManager::GetUserManager()->findUser("Mido").getLaughs()+1);
|
# ? Aug 26, 2013 17:52 |
|
Mido posted:UserManager::GetUserManager()->findUser("Mido")->setLaughs(UserManager::GetUserManager()->findUser("Mido").getLaughs()+1); NULLERROR
|
# ? Aug 26, 2013 18:06 |
|
I think I use way too much breaks and continues in my code.
|
# ? Aug 26, 2013 22:58 |
|
Mido posted:UserManager::GetUserManager()->findUser("Mido")->setLaughs(UserManager::GetUserManager()->findUser("Mido").getLaughs()+1); i have written code that is this but with different names it gets really bad when you're manipulating the same user (or w/e) multiple times in a short number of lines and every time you add a new line of it youre like 'yeah if i add one more line of this imma just make a local variable' but you never do because youre a terrible programmer
|
# ? Aug 26, 2013 23:00 |
|
Symbolic Butt posted:I think I use way too much breaks and continues in my code. this seems improbable
|
# ? Aug 26, 2013 23:05 |
|
idk it may be a symptom of my inability to decompose poo poo in small and smart looking functions but using gotos not even once
|
# ? Aug 26, 2013 23:23 |
|
Bloody posted:i have written code that is this but with different names the code i wrote wasnt a joke it was a cry for help
|
# ? Aug 26, 2013 23:27 |
|
i really hate that arrow syntaxs for structs/dicts whatever you want to call them it makes me feel like i'm doing some crazy haskeel mondashit whenever i see it
|
# ? Aug 27, 2013 00:03 |
|
Mido posted:the code i wrote wasnt a joke you are in the right place welcome brother
|
# ? Aug 27, 2013 00:16 |
|
Mido posted:UserManager::GetUserManager()->findUser("Mido")->setLaughs(UserManager::GetUserManager()->findUser("Mido").getLaughs()+1); [✓] Global Variable, or as we call them now, Singleton Pattern [✓] Getters and Setters instead of methods that do things [✓] Possible Race Condition
|
# ? Aug 27, 2013 11:32 |
|
its okay i didn't use a goto, crisis averted
|
# ? Aug 27, 2013 11:39 |
|
tef posted:[✓] Global Variable, or as we call them now, Singleton Pattern what's the race condition?
|
# ? Aug 27, 2013 11:44 |
|
prefect posted:what's the race condition? between the call to getLaughs and setLaughs, some other thread changes the value of Laughs.
|
# ? Aug 27, 2013 12:15 |
|
singletons have valid uses and db proxy objects is one of them (assuming that's what usermanager is) the getter setter stuff on a db proxy is still dumb tho and my guess is hes not wrapping that in a transaction so the race condition is still a problem.
|
# ? Aug 27, 2013 15:15 |
|
altho that's some serious p-langer syntax so whatever it is probably cant even do transactions.
|
# ? Aug 27, 2013 15:17 |
|
Shaggar posted:singletons have valid uses and db proxy objects is one of them (assuming that's what usermanager is) I have no objection to passing in a singleton, but it seems a bit bad to use a global to find it, it can make code harder to test and in effect tightly coupling parts together.
|
# ? Aug 27, 2013 16:01 |
|
don't forget the findUser by static string in two different places
|
# ? Aug 27, 2013 16:31 |
|
tef posted:I have no objection to passing in a singleton, but it seems a bit bad to use a global to find it, it can make code harder to test and in effect tightly coupling parts together. in my case the singletons im pulling out of a global store (spring proxies) implement a specific interface. I pull them out of spring and shove them into whatever is using them. Then my tests can be built against the interface and I can inject proxies the same way to test implementations.
|
# ? Aug 27, 2013 16:55 |
|
Shaggar posted:in my case the singletons im pulling out of a global store (spring proxies) implement a specific interface. I pull them out of spring and shove them into whatever is using them. Then my tests can be built against the interface and I can inject proxies the same way to test implementations. you'll note in the example above it pulls it out of a global and doesn't use a dependency hth
|
# ? Aug 27, 2013 17:07 |
|
oh, you mean tests on the proxy consumer. right. my bad.
|
# ? Aug 27, 2013 17:13 |
|
Shaggar posted:my bad. has this ever happened before?
|
# ? Aug 27, 2013 17:15 |
|
|
# ? Jun 6, 2024 06:29 |
|
prefect posted:
he does it once in a while to make the other posts more believable
|
# ? Aug 27, 2013 17:20 |