Reply to thread
GBAtemp.net - The Independent Video Game Community
Search
Search titles only
By:
Search titles only
By:
Reply to thread
GBAtemp.net - The Independent Video Game Community
Home
Log in
Terms & Rules
Donate
Forums
New posts
Search forums
Groups
Public Events
New
New posts
New resources
New blog entries
New profile posts
New blog entry comments
New threadmarks
Latest activity
Cheats
Cheat Codes Add and Request group
The Legend of Zelda: Tears of the Kingdom cheat codes
Pokémon Legends: Arceus cheat codes
Xenoblade Chronicles 3 cheat codes
Fire Emblem Engage cheat codes
Request a cheat...
Tutorials
Nintendo Switch tutorials
Nintendo 3DS tutorials
Nintendo Wii U tutorials
Reviews
Overview
Official reviews
Downloads
Latest reviews
Search resources
Blogs
New entries
New comments
Blog list
Search blogs
Chat
Top chatters
Search
Search titles only
By:
Search titles only
By:
Log in
Register
New posts
Search forums
Log in
Register
Home
Forums
PC, Console & Handheld Discussions
Nintendo 3DS
[Release] Kuriimu - A general purpose game translation toolkit for authors of fan translations.
Menu
Install the app
Install
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="_Shebang" data-source="post: 7085308" data-attributes="member: 408370"><p>Couple of questions after briefly looking over the source:</p><ol> <li data-xf-list-type="ol">If you are looking to update the preview image every time the text is changed, why not subscribe to the TextBox's <span style="font-family: 'Courier New'">TextChanged</span> event? That way you don't have to manage any string comparison yourself.</li> <li data-xf-list-type="ol">I noticed that you aren't loading your preview image asynchronously, which could cause some hanging if all the processing is being done in the UI thread. You can solve this with a couple of options:</li> </ol> <ul style="margin-left: 20px"> <li data-xf-list-type="ul">You could rewrite the preview generation and updating functions to run asynchronously using the new <span style="font-family: 'Courier New'">async / await</span> pattern from .NET 4.5. This is objectively more work than the next option, but it will be worthwhile to write functions and methods that can take a while as asynchronous, because then you can keep the code a bit cleaner, make custom events for better interaction between plugins and the main application, etc.</li> <li data-xf-list-type="ul">You could simply import <span style="font-family: 'Courier New'">System.Threading.Tasks</span>, and then change <span style="font-family: 'Courier New'">UpdatePreview();</span> to be <span style="font-family: 'Courier New'">Task.Run(() => UpdatePreview());</span>, and it will automatically run without hanging the UI. However, as I haven't tested with your code it's possible this could cause issues you need to check for, such as if a second update is triggered in the middle of a previous update.</li> </ul><p>I would make a PR myself, however I don't really have any material to test with where I am and I'm not completely familiar with the codebase.</p></blockquote><p></p>
[QUOTE="_Shebang, post: 7085308, member: 408370"] Couple of questions after briefly looking over the source: [LIST=1] [*]If you are looking to update the preview image every time the text is changed, why not subscribe to the TextBox's [FONT=Courier New]TextChanged[/FONT] event? That way you don't have to manage any string comparison yourself. [*]I noticed that you aren't loading your preview image asynchronously, which could cause some hanging if all the processing is being done in the UI thread. You can solve this with a couple of options: [/LIST] [INDENT][LIST] [*]You could rewrite the preview generation and updating functions to run asynchronously using the new [FONT=Courier New]async / await[/FONT] pattern from .NET 4.5. This is objectively more work than the next option, but it will be worthwhile to write functions and methods that can take a while as asynchronous, because then you can keep the code a bit cleaner, make custom events for better interaction between plugins and the main application, etc. [*]You could simply import [FONT=Courier New]System.Threading.Tasks[/FONT], and then change [FONT=Courier New]UpdatePreview();[/FONT] to be [FONT=Courier New]Task.Run(() => UpdatePreview());[/FONT], and it will automatically run without hanging the UI. However, as I haven't tested with your code it's possible this could cause issues you need to check for, such as if a second update is triggered in the middle of a previous update. [/LIST][/INDENT] I would make a PR myself, however I don't really have any material to test with where I am and I'm not completely familiar with the codebase. [/QUOTE]
Insert quotes…
Verification
Post reply
Home
Forums
PC, Console & Handheld Discussions
Nintendo 3DS
[Release] Kuriimu - A general purpose game translation toolkit for authors of fan translations.
General chit-chat
Help
Users
Settings
Notifications
Miscellaneous
Inverse message direction
Display editor on top
Enable maximized mode
Display images as links
Hide bot messages
Hide statuses
Hide chatter list
Show messages from ignored users
Temporarily disable chat
Receive mention alerts
Sound notifications
Normal messages
Private messages
Whisper messages
Mention messages
Bot messages
Desktop notifications
Normal messages
Private messages
Whisper messages
Mention messages
Bot messages
Options
Options
View top chatters
Veho
Loading…
BakerMan
Loading…
I rather enjoy a life of taking it easy. I haven't reached that life yet though.
K
@
Kaden Kyarel
:
can anyone explain why I get ads when I'm paying for no ads?
Today at 3:15 AM
@
Psionic Roshambo
:
You pay you pay now!!! lol (I don't know)
Today at 3:16 AM
@
SylverReZ
:
@Kaden Kyarel
, Either support GBAtemp with Patron or use an ad-blocker.
Today at 3:16 AM
@
Psionic Roshambo
:
You guys get ads?
Today at 3:17 AM
K
@
Kaden Kyarel
:
I've been paying for Ad-free & patron perks $5 per month for a year now
Today at 3:17 AM
@
Psionic Roshambo
:
I use Chrome but I think my ISP blocks a lot of ads at the ISP level
Today at 3:17 AM
@
Psionic Roshambo
:
Kaden maybe contact the staff? I don't know how all that works
Today at 3:17 AM
@
BakerMan
:
i use firefox+ublock
Today at 3:22 AM
@
SMG4
:
hi
Today at 3:24 AM
@
Psionic Roshambo
:
https://www.youtube.com/watch?v=Ei5hC8ahLoc
Today at 3:31 AM
@
Psionic Roshambo
:
https://www.youtube.com/watch?v=HHNH5pnioQk
Today at 3:36 AM
@
SylverReZ
:
https://www.youtube.com/watch?v=95eUhuR8_ps
Today at 3:43 AM
@
Materia_tofu
:
hey sylv? do you know why gameyob crashes on the EZP?
Today at 3:46 AM
@
Materia_tofu
:
@SylverReZ
forgor to tag lol
Today at 3:55 AM
@
SylverReZ
:
@Materia_tofu
, Maybe ask the EZ-Flash team.
Today at 3:55 AM
@
Materia_tofu
:
maybe tomorrow lol
Today at 3:57 AM
@
SylverReZ
:
You can make a post on the DS forum about your findings, and they'll do their best to respond. They have a GBAtemp account here, you know.
Today at 3:58 AM
@
Materia_tofu
:
oh ye i made a post i did forget they had an account i prob shouldve tagged them in the post
tbh
+1
Today at 4:00 AM
@
SylverReZ
:
@Materia_tofu
, Would've been a great idea, because they'll notice.
+1
Today at 4:08 AM
@
Materia_tofu
:
im not a very bright individual, but we live and we learn
Today at 4:13 AM
@
SylverReZ
:
@Materia_tofu
, We do learn a lot from plenty of talented individuals.
Today at 4:15 AM
@
Materia_tofu
:
this is true! i learned how to make soundfont remixes from a friend back in 2021
+1
Today at 4:22 AM
@
BakerMan
:
Update on my brother: He's home now, tired and hungry, obviously, but other than that, seems to be doing fine.
+2
13 minutes ago
@
Veho
:
That's a relief to hear. Do you know what happened?
8 minutes ago
@
SylverReZ
:
@BakerMan
, Any idea what happened? I hope that your brother's doing good.
2 minutes ago
Submit
@
SylverReZ
:
@BakerMan, Any idea what happened? I hope that your brother's doing good.
2 minutes ago
Chat
2