wxFindReplaceData(3)

πŸ“¦
version 29.0.6 Β· 3 versions
, in ubuntu stonking

πŸ’– wxFindReplaceData β€” the Erlang module, bestie edition ✨

okay so this is wxFindReplaceData(3) from the Erlang Module Definition corner of the wx universe. welcome, pull up a chair, we're gonna talk about the little object that holds all the find-and-replace vibes πŸŽ€


🌸 NAME 🌸

wxFindReplaceData β€” it's the data holder for wxFindReplaceDialog. that's it. that's the whole job. and it eats πŸ’…


✨ DESCRIPTION ✨

So here's the tea πŸ“: this object is used to initialize the dialog with the default values, and it also keeps the last values from the dialog when it is closed. She's a keeper, literally. She remembers.

She's also updated each time a wxFindDialogEvent (not implemented in wx) is generated. which means β€” and this is the slay part β€” instead of using the wxFindDialogEvent (not implemented in wx) methods you can also directly query this object. no middleman, no drama, just ask her directly 🫢

⚠️ MAJOR CAVEAT, DO NOT SKIP THIS ONE: note that all SetXXX() methods may only be called before showing the dialog and calling them has no effect later. like, they just do nothing. silently. the audacity 😭 so set your stuff up first, then show the dialog. periodt.

wxWidgets docs: wxFindReplaceData β€” iykyk, go read those too πŸ“š


πŸ¦‹ DATA TYPES πŸ¦‹

  • wxFindReplaceData() β€” this is :: wx:wx_object(). cute, right? standard wx object energy πŸ’œ

πŸ‘‘ FUNCTIONS πŸ‘‘

πŸ’« destroy(This :: wxFindReplaceData()) -> ok

Destroys the object. bye bestie, thank you for your service 😭✨

She's gone. no cap.


πŸ’« getFindString(This) -> unicode:charlist() when This :: wxFindReplaceData()

Get the string to find. the whole reason we're here, honestly πŸ”βœ¨


πŸ’« getFlags(This) -> integer() when This :: wxFindReplaceData()

Get the combination of wxFindReplaceFlags values. all the little toggles, bundled up in one integer, iconic 🌈


πŸ’« getReplaceString(This) -> unicode:charlist() when This :: wxFindReplaceData()

Get the replacement string. the glow-up string. the "new you" string πŸ’–


πŸ’« new([Option]) -> wxFindReplaceData() when Option :: {flags, integer()}

Constructor πŸŽ€ β€” and here's the key detail: it initializes the flags to default value (0). so if you don't pass anything, she starts at zero, fresh-faced and unbothered.


πŸ’« setFindString(This, Str) -> ok when This :: wxFindReplaceData(), Str :: unicode:chardata()

Set the string to find β€” this is used as initial value by the dialog. so you prep her, then she walks in and delivers πŸ”₯


πŸ’« setFlags(This, Flags) -> ok when This :: wxFindReplaceData(), Flags :: integer()

Set the flags to use to initialize the controls of the dialog. you're picking how the checkboxes and widgets wake up in the morning ⭐


πŸ’« setReplaceString(This, Str) -> ok when This :: wxFindReplaceData(), Str :: unicode:chardata()

Set the replacement string β€” also used as initial value by the dialog. fill her in, then let her cook 🧚

🫢 reminder from above because it's that important: every SetXXX() in here has to happen before showing the dialog. after that? no effect. set it early or set it never, bestie πŸ’€

🌟 SEE ALSO 🌟

nothing extra listed here, just the wxWidgets docs: wxFindReplaceData link up in the DESCRIPTION ✨ go click it, it's giving documentation πŸ’…


that's the whole page, you ate it, you understood it, I'm so proud πŸ˜­πŸ‘‘

kisses, this was the wxFindReplaceData(3) page, brought to you by Ericsson AB for wx 2.6 β€” dated from the wx 2.6 era, and yes she's still iconic πŸ’œβœ¨

πŸ“¦ where this page comes from