diff --git a/docs/src/content/docs/tutorials/03-notes-vanilla.mdx b/docs/src/content/docs/tutorials/03-notes-vanilla.mdx index 329827c3a..bcdddf930 100644 --- a/docs/src/content/docs/tutorials/03-notes-vanilla.mdx +++ b/docs/src/content/docs/tutorials/03-notes-vanilla.mdx @@ -115,7 +115,7 @@ In this tutorial, you'll build a notes application that demonstrates file operat // SaveToFile saves notes to a file func (n *NotesService) SaveToFile() error { - path, err := application.SaveFileDialog(). + path, err := application.Get().Dialog.SaveFile(). SetFilename("notes.json"). AddFilter("JSON Files", "*.json"). PromptForSingleSelection() @@ -133,7 +133,7 @@ In this tutorial, you'll build a notes application that demonstrates file operat return err } - application.InfoDialog(). + application.Get().Dialog.Info(). SetTitle("Success"). SetMessage("Notes saved successfully!"). Show() @@ -143,7 +143,7 @@ In this tutorial, you'll build a notes application that demonstrates file operat // LoadFromFile loads notes from a file func (n *NotesService) LoadFromFile() error { - path, err := application.OpenFileDialog(). + path, err := application.Get().Dialog.OpenFile(). AddFilter("JSON Files", "*.json"). PromptForSingleSelection() @@ -163,7 +163,7 @@ In this tutorial, you'll build a notes application that demonstrates file operat n.notes = notes - application.InfoDialog(). + application.Get().Dialog.Info(). SetTitle("Success"). SetMessage("Notes loaded successfully!"). Show() @@ -180,8 +180,8 @@ In this tutorial, you'll build a notes application that demonstrates file operat - **Note struct**: Defines the data structure with JSON tags (lowercase) for proper serialization - **CRUD operations**: GetAll, Create, Update, and Delete for managing notes in memory - - **File dialogs**: Uses package-level functions `application.SaveFileDialog()` and `application.OpenFileDialog()` - - **Info dialogs**: Shows success messages using `application.InfoDialog()` + - **File dialogs**: Uses `application.Get().Dialog.SaveFile()` and `application.Get().Dialog.OpenFile()` to access native dialogs + - **Info dialogs**: Shows success messages using `application.Get().Dialog.Info()` - **ID generation**: Simple timestamp-based ID generator 3. **Update main.go**